package com.yunhe.authority.domain.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.neo4j.ogm.annotation.GeneratedValue;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;

import java.io.Serializable;
import java.util.List;

/**
 * 地区对象
 * @desc 地区对象定义
 * @author liuronglei
 */
@ApiModel(value = "Area", description = "地区对象")
@NodeEntity
public class Area implements Serializable {
    @ApiModelProperty(value = "地区ID")
    @Id
    @GeneratedValue
    private Long id;
    @ApiModelProperty(value = "编号")
    private String name;
    @ApiModelProperty(value = "代码")
    private Long code;
    @ApiModelProperty(value = "标题")
    private String title;
    @ApiModelProperty(value = "子地区", hidden = true)
    @Relationship(type = "HAS_CHILD")
    private List<Area> children;
    @ApiModelProperty(value = "行政区")
    private String adminArea;

    public String getAdminArea() {
        return adminArea;
    }

    public void setAdminArea(String adminArea) {
        this.adminArea = adminArea;
    }

    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<Area> getChildren() {
        return children;
    }

    public void setChildren(List<Area> children) {
        this.children = children;
    }
}
